<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>

		<span><s:property value='%{getText("page_gt")}' />${entity.count}<s:property value='%{getText("page_jl")}' /> <s:property value='%{getText("page_myxs")}' /><input name="pageSize" value="${entity.pageSize }" class="go_input"/><s:property value='%{getText("page_t")}' /></span>
			
			<a href="javascript:page_first();"><s:property value='%{getText("page_p1")}' /></a> |
			<a href="javascript:page_pre();"><s:property value='%{getText("page_p2")}' /></a> |
			<a href="javascript:page_next();"><s:property value='%{getText("page_p3")}' /></a> |
			<a href="javascript:page_last();"><s:property value='%{getText("page_p4")}' /></a>
			
			<s:property value='%{getText("page_di")}' /><input name="pageNo" value="${entity.pageNo }" class="go_input"/><s:property value='%{getText("page_ye")}' />
			/ <s:property value='%{getText("page_gong")}' />${entity.pageTotal } <s:property value='%{getText("page_ye")}' />
			<input type="button" onclick="javascript:page_go();" Class="go_btn" title="点击跳转">
			<script>
		function page_go()
		{
			page_validate();	
		}
		function page_first()
		{
			document.forms[0].elements["pageNo"].value = 1;
			document.forms[0].action=document.forms[0].action+"?pageName=page";
			document.forms[0].submit();
		}
		function page_pre()
		{
			var pageNo = document.forms[0].elements["pageNo"].value;
			document.forms[0].elements["pageNo"].value = parseInt(pageNo) - 1;
			page_validate();
		}
		function page_next()
		{
			var pageNo = document.forms[0].elements["pageNo"].value;
			document.forms[0].elements["pageNo"].value = parseInt(pageNo) + 1;
			page_validate();
		}
		function page_last()
		{
			document.forms[0].elements["pageNo"].value = ${entity.pageTotal};
			document.forms[0].action=document.forms[0].action+"?pageName=page";
			document.forms[0].submit();
		}
		function page_validate()
		{
			var reg =/\d/g;
			var pageTotal = ${entity.pageTotal};
			var pageNo = document.forms[0].elements["pageNo"].value;
			var recTotal = ${entity.count };
			var pageSize = document.forms[0].elements["pageSize"].value;
			if(pageNo.replace(reg,"")!=""||pageSize.replace(reg,"")!=""){
				pageNo=1;
				pageSize=${entity.pageSize};
			}else{
				if (pageNo<1)pageNo=1;
				if (pageNo>pageTotal)pageNo=pageTotal;
				if (pageSize<1)pageSize=${entity.pageSize};
			}
			document.forms[0].elements["pageNo"].value = pageNo;
			document.forms[0].elements["pageSize"].value = pageSize;
			document.forms[0].action=document.forms[0].action+"?pageName=page";
			document.forms[0].submit();
			
		}
	</script>